package com.example.administrator.xiaoxiang.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;

import com.bigkoo.convenientbanner.holder.Holder;
import com.bumptech.glide.Glide;
import com.example.administrator.xiaoxiang.R;
import com.example.administrator.xiaoxiang.bean.HomeHeadBean;

/**
 * Created by Administrator on 2017/1/7.
 */

public class ConvenientBarHolder implements Holder<HomeHeadBean> {
    ImageView imageView;
    @Override
    public View createView(Context context) {
        View view = LayoutInflater.from(context).inflate(R.layout.item_home_head,null);
        imageView = (ImageView) view.findViewById(R.id.image_home_head);
        return view;
    }

    @Override
    public void UpdateUI(Context context, int position, HomeHeadBean data) {
        Glide.with(context).load(data.url).placeholder(R.drawable.home_goods_small_nothing).into(imageView);

    }


}
